package 
{
	import chamans.*;
	import chamans.away.*;
	import chamans.engine.*;
	import flash.geom.Vector3D;
	import chamans.away.*;
	
	[SWF(backgroundColor="#000000", frameRate="120", width="960", height="540")]
	
	public class bulletlabs extends Away4
	{
		public function bulletlabs()
		{
			var DEF:Object={ 
				phy:true, fog:true, reflect:true, sky:true,
				titre:"BULLET LABS",  	message:"_", 
				color:[0x582C31, 0x103A72, 0x07101C, 0x223856, 2000, 1, 1, true, false],
				// camera set 
				fov:50, far:7500, near:1, type:"fps", H:90, V:70, Q:0,
				targetDistance : 2000, position : new Vector3D(-200,170,1200)
			}
			super(INIT3D, null, DEF);
		}
		private function INIT3D():void
		{
			Lights.add("point", 0xeeEFff, -405, 330, -405, .8, 1, false , null, true ,400, 3000);
			Lights.add("point", 0xFFEFee, 405, 330, -405, .8, 1, false , null, true ,400, 3000);
			Lights.add("direct", 0xFFFFEE, -.3,- .3, -1,.8, 1.2, false , null, false ,300, 3000);
			Lights.add("direct", 0xeeeeFF, .3, .3, 1,.8, 0, false , null, false ,300, 3000);
			
			if(phyOn) physics = new Bullet( this, 0.015, 0.02, 1 );
			Camera.plan("maplabs", 3,  new Vector3D(5,.25,2048));
			SYS.VISOR(true);
			A = new Room(this,NEXT);
		}	
		private function NEXT():void
		{
			B = new desk(this, NEXT2, new Vector3D(0,37,400));
		}
		private function NEXT2():void
		{
			var posy:int=37;
			B.clone( new Vector3D(-150,posy,400 ), new Vector3D(0,-135,0));
			B.clone( new Vector3D(150,posy,400 ), new Vector3D(0,135,0));
			B.clone( new Vector3D(-150,posy,700 ), new Vector3D(0,-45,0));
			B.clone( new Vector3D(150,posy,700 ), new Vector3D(0,45,0));
			
			C=new chair(this, NEXT3, new Vector3D(0,43,420) );
		}
		private function NEXT3():void
		{
			var posy:int=43;
			C.clone(new Vector3D(-170,posy,380),new Vector3D(0,-135,0) );
			C.clone(new Vector3D(170,posy,380),new Vector3D(0,135,0) );
			C.clone(new Vector3D(-170,posy,720),new Vector3D(0,-45,0) );
			C.clone(new Vector3D(170,posy,720),new Vector3D(0,45,0) );
			
			if(phyOn)physics.add_Crate(NEXT5);
		}
		
		private function NEXT5():void
		{
			E=new fatc(this, NEXT6, new Vector3D(-800, 0, 450));
		}
		private function NEXT6():void
		{
			E.clone(new Vector3D(200,600,900));
			D=new Ecran(this, NEXT7, new Vector3D(0,43,42));
		}
		private function NEXT7():void
		{
			var posy:int=100;  var posz:int=380;
			D.clone(new Vector3D(-130,posy,410),new Vector3D(0,-135,0) );
			D.clone(new Vector3D(130,posy,410),new Vector3D(0,135,0) );
			D.clone(new Vector3D(-130,posy,690),new Vector3D(0,-45,0) );
			D.clone(new Vector3D(130,posy,690),new Vector3D(0,45,0) );
			
			Shadows(1);
		}
		private var A:Room;
		private var B:desk;
		private var C:chair;
		private var D:Ecran;
		private var E:fatc;
	}}
